import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import '@/styles/index.less';
import TDesign from 'tdesign-vue-next';
import 'tdesign-vue-next/es/style/index.css';
import * as TDesignIcons from 'tdesign-icons-vue-next';
import ellipsisTooltip from './directives/ellipsisTooltip';
import debounce from './directives/debounce.js';
import throttle from './directives/throttle.js';

const app = createApp(App)
for (const [key, component] of Object.entries(TDesignIcons)) {
    app.component(key, component);
}

app.use(createPinia())
app.use(router)
app.use(TDesign);
app.directive('ellipsis-tooltip', ellipsisTooltip);
app.directive('debounce', debounce);
app.directive('throttle', throttle);

app.mount('#app')
